{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang admin_operation_sharebutton:admin}</h3>
	</div>
	<div class="alert alert-info mt10">
		<span class="label label-info">{lang info:admin}</span>
		{lang admin_operation_sharebutton_tip:admin}
	</div>
	<div class="setform">
		<table class="table table-striped">
        <thead>
          <tr>
            <th width="200">{lang admin_operation_sharebutton_key:admin}</th>
            <th width="200">{lang admin_operation_sharebutton_name:admin}</th>
            <th width="200">{lang admin_operation_sharebutton_windowsize:admin}</th>
            <th width="200">{lang admin_operation_sharebutton_open:admin}</th>
            <th width="200">{lang operation:admin}</th>
          </tr> 
        </thead>
        <tbody>
        {loop $sharebuttons $key $sm}
			<tr>
			<td>$key</td>
			<td>$sm['name']</td>
			<td>{$sm['width']}X{$sm['height']}</td>
            <td>{if $sm['open']}{lang yes:admin}{else}{lang no:admin}{/if}</td>
			<td><a href="{url admin/sharebutton?act=edit&key=$key}">{lang edit:admin}</a> <a href="{url admin/sharebutton?act=delete&key=$key}">{lang delete:admin}</a></td>
          	</tr>
		{/loop}
          
        </tbody>
		</table>
	</div>
	<div class="settitle">
		<h3>{lang add_sharebutton:admin}</h3>
	</div>
	<div class="setform">
		<form class="pzform" method="post" action="{url admin/sharebutton?act=add}" id="addform">
			
			<div class="formgroup">
				<label class="formlabel">{lang admin_operation_sharebutton_key:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="key" id="key"/>
				</div>
				<span class="formhelp">{lang admin_operation_sharebutton_key:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang admin_operation_sharebutton_name:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="name" id="name"/>
				</div>
				<span class="formhelp">{lang admin_operation_sharebutton_name:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang admin_operation_sharebutton_link:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="link" id="link"/>
				</div>
				<span class="formhelp">{lang admin_operation_sharebutton_link_tip:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang admin_operation_sharebutton_windowsize:admin}:</label>
				<div class="formcontrol">
					<label>{lang width:admin}:</label>
					<input type="text" class="small" name="width"  value="$setting['width']"> 
					<label>{lang height:admin}:</label>
               		<input type="text" class="small" name="height" value="$setting['height']">
				</div>
				<span class="formhelp">{lang admin_operation_sharebutton_windowsize:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang admin_operation_sharebutton_open:admin}:</label>
				<div class="formcontrol">
					<input type="radio" name="open" value="1">{lang yes:admin}</input>
              		<input type="radio" name="open" value="0">{lang no:admin}</input>
				</div>
				<span class="formhelp">{lang admin_operation_sharebutton_open:admin}</span>
			</div>
			<div class="formbuttons">
				<button type="submit" class="btn btn-primary">{lang add:admin}</button>
			</div>
		</form>
	</div>
</div>
{template common/contentfooter}